Skip to content

test: add unexpected disconnect guards to http2 tests#5533

Open
Develop-KIM wants to merge 1 commit into
nodejs:mainfrom
Develop-KIM:test/h2-disconnect-guards
Open

test: add unexpected disconnect guards to http2 tests#5533
Develop-KIM wants to merge 1 commit into
nodejs:mainfrom
Develop-KIM:test/h2-disconnect-guards

Conversation

@Develop-KIM

Copy link
Copy Markdown
Contributor

Adds the disconnect guard pattern from docs/docs/best-practices/writing-tests.md
to the happy-path HTTP/2 test files, so silent disconnect/reconnect cycles fail
the tests instead of passing unnoticed.

Files covered (12 guards): http2-pseudo-headers.js, http2-continue.js,
http2-connection.js, http2-pipelining-default.js (incl. one Pool guard).

Intentionally skipped: http2-instantiation.js (ALPN-mismatch test where
disconnect is expected) and http2-invalid-connection-headers.js (reconnection
is the behavior under test). Happy to cover http2-body.js and the connect-*
group in follow-ups.

Refs: #251

🤖 Generated with Claude Code

Add the disconnect guard pattern from docs/best-practices/writing-tests.md
to the happy-path HTTP/2 test files so silent reconnects fail the tests.

Refs: nodejs#251

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.44%. Comparing base (3c662a5) to head (f37e858).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5533      +/-   ##
==========================================
- Coverage   93.44%   93.44%   -0.01%     
==========================================
  Files         110      110              
  Lines       37329    37329              
==========================================
- Hits        34883    34882       -1     
- Misses       2446     2447       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants